<template>
  <div class="world">
    我是{{world}}
    <button @click="goHi">go hi</button>
    <button @click="changeBtn">changeBtn</button>
  </div>
</template>

<script>
  import dd from 'dd'
  import { mapState, mapMutations, mapActions } from 'vuex'
  import store from './store/index'
  export default dd.component(
    {
      data () {
        return {

        }
      },
      methods:{
        changeBtn(){
          this.sendWorld("xi,an")
        },
        goHi(){
          const url = '/hi'
          this.$router.push({path:url})
        }
      },
      computed:{

      },
      created(){

      }
    },
    {
      state:{
        'self':['world','iphone']
      },
      getters:{},
      mutations:{
        'self':['changeWorld']
      },
      actions:{
        'self':['sendWorld']
      }
    },
    {
      mName:'world',
      store
    })
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
